package backend.majiong.yaku.yaku;

import java.util.List;

import backend.MainGame;
import backend.majiong.Pai;
import backend.majiong.Player;
import backend.majiong.yaku.AbstractYaku;
import backend.majiong.yaku.HandCombo;

public class Tanyao extends AbstractYaku {

    @Override
    public boolean checkYaku(Player player, HandCombo combo, MainGame mainGame) {
        List<Pai> list = combo.getAllHandPai();
        for (Pai pai : list) {
            if (pai.isYaoJiu()) {
                return false;
            }
        }
        return true;
    }

    @Override
    public String getYakuName() {
        return "断幺九";
    }

    @Override
    public Integer getYakuNum(boolean isMenQing) {
        return 1;
    }

}
